home *** CD-ROM | disk | FTP | other *** search
/ The Epic Collection 3 / Epic Collection 3, The (1997)(Epic Marketing)[!].iso / useful_tools / toolmanager / scripts / dnetgetfile.rexx next >
OS/2 REXX Batch file  |  1978-06-30  |  2KB  |  48 lines

  1. /*********************************************************/
  2. /*                                                       */
  3. /* rexx:DNetGetFile.rexx  V1.0                           */
  4. /*                                                       */
  5. /* ARexx script for DNet's getfiles                      */
  6. /*                                                       */
  7. /* Requires rexxarplib.library V3.0                      */
  8. /*                                                       */
  9. /* © 1991 Stefan Becker                                  */
  10. /*                                                       */
  11. /* ToolManager configuration file entry for this script: */
  12. /*                                                       */
  13. /* CLI:                                                  */
  14. /* Alias    = Get File                                   */
  15. /* RealName = rx DNetGetFile                             */
  16. /* Path     = <path to DNet binaries>                    */
  17. /* Args     = OFF                                        */
  18. /* #                                                     */
  19. /*                                                       */
  20. /*********************************************************/
  21.  
  22. /* Set constants */
  23. output='CON:0/0/640/100/Downloading File/AUTO/WAIT/ALT/INACTIVE'
  24.  
  25. /* Try to open rexxarplib */
  26. IF ~SHOW('Libraries','rexxarplib.library') THEN
  27.  IF ~ADDLIB('rexxarplib.library',0,-30,0) THEN RETURN 20
  28.  
  29. /* Put up a requester for the file name */
  30. file=Request(50,50,'Specify file name','','Ok','Cancel','Workbench');
  31.  
  32. IF file=='' THEN
  33. /* No file specified */
  34. DO
  35.  /* Print out an error message */
  36.  IF OPEN(error,output,'Write') THEN
  37.   DO
  38.    WRITELN(error,'No file specified')
  39.    WRITELN(error,'exiting...')
  40.    CLOSE(error)
  41.   END
  42. END
  43. /* Download file */
  44. ELSE ADDRESS COMMAND 'getfiles >"'output'"' '"'file'"'
  45.  
  46. /* Exit script */
  47. RETURN 0
  48.